package com.sh.weblogspringboot.common.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * @author songHai
 * @Classname BizException
 * @Description
 * @Date 2025/3/23 19:43
 */
@Getter
@Setter
public class BizException extends RuntimeException {

    /**
     * 异常码.
     */
    private String errorCode;

    /**
     * 错误信息.
     */
    private String errorMessage;

    public BizException(BaseExceptionInterface baseExceptionInterface) {
        this.errorCode = baseExceptionInterface.getErrorCode();
        this.errorMessage = baseExceptionInterface.getErrorMessage();
    }
}
